package com.kemplerEnergy.servlets;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.Calendar;
import java.util.Date;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


/**
 * Servlet implementation class ReadReportTodayServlet
 */
public class ReadReportTodayServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
    /**
     * @see HttpServlet#HttpServlet()
     */
    public ReadReportTodayServlet() {
        super();
        // TODO Auto-generated constructor stub
    }

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
//		super.doGet(request, response);
		
		if(request.getParameter("type").equalsIgnoreCase("POSITION")){
			ReportPositionServlet report = new ReportPositionServlet ();
//			report.reportPosition(request, response);
		}
		else{
			ReportMTMServlet report = new ReportMTMServlet ();
//			report.reportMTM(request, response);
		}

		/*
		PrintWriter out = response.getWriter();
		Calendar rightNow = Calendar.getInstance();
		out.print(rightNow.get(Calendar.MONTH)+1);
		out.print(rightNow.get(Calendar.DAY_OF_MONTH));
		*/
	}

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		super.doPost(request, response);
	}

}
